Electronic control unit having analog input signal

ABSTRACT

An analog input signal obtained from an analog sensor group  104 A and first and second calibration voltages obtained by high-precision voltage-dividing resistors are successively selected by a multiplexer, digitally converted through an AD converter and then input to a microprocessor. The microprocessor calculates a collinear approximate coefficient based on the first and second calibration voltages in cooperation with a program memory, and corrects the digital conversion value to the analog input signal by using the approximate coefficient, thereby correcting a linear error of the conversion characteristic of the AD converter. In the calculation of the approximate coefficient, upper and lower limit check is executed on measurement values and calculation coefficients, and also plural calculation results are averaged to enhance the precision.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an electronic control unit having ananalog input signal that is improved so as to obtain a digitalconversion output having high-precession and high-reliability bycorrecting a linear error of a digital conversion characteristic to ananalog input signal of a multi-channel analog-digital converter(hereinafter referred to as AD converter).

2. Description of the Related Art

There is a limit to secure high digital conversion precision by analogcalibration in a manufacturing process of AD converters, and thus therehas been adopted a method of subjecting inexpensive and low-precision ADconverts to digital calibration at a practical use stage to obtainrequired conversion precision. For example, “DIGITAL CALIBRATION METHODAND APPARATUS FOR AD CONVERTER OR DA CONVERTER” described inJP-A-2000-295102 discloses, as a method of performing efficientcalibration on AD converters, a digital calibration method for an ADconverter which is characterized by comprising the steps of: inputtingat least two different reference analog signals to an AD converter to becalibrated; calculating a correction parameter on the basis of eachdigital signal converted in the AD converter in accordance with theinput of each reference analog signal; and executing correctingoperation on the output digital signal of the AD converter by using thecorrection parameter calculated in the correction parameter calculatingstep.

According to the above publication, when a reading error occurs due tonoise malfunction or the like in the step of inputting at least twodifferent reference analog signals to the AD converter to be calibratedor when a calculation error occurs in the step of calculating thecorrection parameter on the basis of each digital signal converted inthe AD converter in accordance with the input of each reference analogsignal, a digital conversion value which is subsequently subjected tocorrection calculation by using an improper correction parametercontinues to contain an abnormal error. A factor which inducesoccurrence of the calculation error resides in that even in the case ofuse of a high-precision reference analog signal, the converted digitalvalue varies when a voltage applied to a reference voltage terminal ofthe AD converter varies. In the case of an AD converter which is usedwithout being subjected to the correcting operation, an erroneousdigital conversion value caused by a temporary noise malfunction isrestored to a normal value by next measurements which are periodicallyread out (executed). However, if the correction parameter hasabnormality, it induces a defect which is not temporary, but critical.

SUMMARY OF THE INVENTION

The present invention has been implemented in view of the foregoingsituation, and has an object to provide an electronic control unithaving an analog input signal in which a correction parameter forobtaining high-precision digital conversion data can be calculatedaccurately, highly precisely and in short time.

In order to attain the above object, according to an electronic controldevice having an analog input signal of the invention, one of analoginput signals of plural points obtained from an analog sensor group issuccessively selected by a multiplexer and applied to an analog inputterminal of an AD converter, and digital data digitally-converted by theAD converter are input to a microprocessor. Calibration voltage signalsof plural points are input to the multiplexer, and control programsserving as a collinear approximate coefficient calculating unit, aninterpolation correcting calculation unit, an averaging unit and a bandcheck unit are added to a program memory cooperating with themicroprocessor. The calibration voltage signals are voltage inputsignals obtained by dividing a reference voltage Vref applied to areference voltage terminal of the AD converter with pluralhigh-precision voltage-dividing resistors.

The collinear approximate coefficient calculating unit represents acharacteristic of a digital conversion value to the whole band of theinput signal voltage of the AD converter by a single or pluralapproximate lines, calculates a proportional coefficient and an offsetcomponent of an approximate line calculation equation so that therelationship between the voltage and the digital conversion value of theplural calibration voltage signals is contained on the approximate line,and sets the calculated proportional coefficient and offset component asparameters for collinear approximation.

The interpolation correcting calculation unit reads out a digitalconversion value to one input signal voltage of the analog inputsignals, calculates back the analog input voltage corresponding to thedigital conversion value from the approximate line, and sets the valueproportional to the calculated-back calculation value as a correcteddigital conversion value. The averaging unit executes calculation of anapproximate calculation equation by the collinear approximatecoefficient calculating unit at plural times, calculating each averagevalue of the obtained proportional coefficient and offset component andsets the average value as a practical parameter to be applied in theinterpolation correcting calculating unit.

The band check unit determines whether the digital conversion value ofthe calibration voltage signal is within a range of upper and lowerlimit threshold values for calibration values stored in the programmemory or is a parameter for collinear approximation, or whether thevalues of the practical parameter is within a range of upper and lowerlimit threshold values of parameters stored in the program memory, andexecutes read-out of the digital conversion value of the calibrationvoltage signal and calculation and averaging of the parameter for thecollinear approximation when the determination result is an abnormalvalue out of the range.

According to the electronic control device having the analog inputsignal of the present invention, even with an inexpensive AD converterhaving a large linear error in a digital conversion output to an analoginput, an accurate digital conversion output can be obtained by thecorrecting unit, and also a calculation error can be prevented fromoccurring due to a ripple variation or the like by the band check unit.Therefore there can be suppressed a risk that an erroneous AD conversioncorrection is continually carried out on all of plural input analoginputs by using an erroneous coefficient.

Furthermore, by using the averaging unit, the precision of the collinearapproximate coefficient to be practically used can be enhanced, and theAD conversion correction can be performed with higher precision. Evenwhen the calibration voltage signal has a minute ripple variation, theeffect of the abnormality value can be suppressed by using the averagingunit. In this case, a larger amount of data are required to be averaged,and long time is required to obtain the practical collinear approximatecoefficient. In addition, if an abnormal ripple value accidentallycontinues at the read-out timing of the calibration voltage signal, anerror component which cannot be dissolved by only the averaging unitremains.

According to this invention, by using the band check unit and theaveraging unit in combination, the high-precision practical collinearapproximate coefficient can be obtained in short time.

The foregoing and other object, features, aspects and advantages of thepresent invention will become more apparent from the following detaileddescription of the present invention when taken in conjunction with theaccompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a circuit block diagram showing an electronic control unitaccording to a first embodiment of the present invention;

FIG. 2 is a characteristic diagram of the electronic control unit ofFIG. 1;

FIG. 3 is a flowchart showing a first half part of the operation of amicroprocessor shown in FIG. 1;

FIG. 4 is a flowchart showing a second half part of the operation of themicroprocessor shown in FIG. 1;

FIG. 5 is a circuit block diagram showing an electronic control unitaccording to a second embodiment of the present invention;

FIG. 6 is a characteristic diagram of the electronic control unit shownin FIG. 5;

FIG. 7 is a flowchart showing a first half part of the operation of amicroprocessor shown in FIG. 5; and

FIG. 8 is a flowchart showing a second half part of the operation of themicroprocessor shown in FIG. 5.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

Preferred embodiments according to the present invention will bedescribed hereunder with reference to the accompanying drawings.

First Embodiment

(1) Detailed Description of Construction

FIG. 1 is a circuit block diagram showing an electronic control unitaccording to a first embodiment of the present invention. In FIG. 1, anelectronic control unit 100A is a controller for an in-vehicle mountengine, for example, and it is connected to a power supply 101 as anin-vehicle mount battery through an output contact point 102 a of apower supply relay 102. An exciting coil 102 b of the power supply relay102 is driven by a power supply control circuit 121 described later. Apower supply switch 103 is connected to the electronic control unit100A, and energizes the power supply relay 102 in cooperation with thepower supply control circuit 121.

An analog sensor group 104A which inputs signals to a microprocessor(CPU) 110 described later through an interface circuit (not shown)contains various kinds of sensors for monitoring the operation conditionof the engine such as an air flow sensor for measuring an air-intakeamount of the engine, an accelerator position sensor for detecting thestep-on degree of an accelerator pedal (throttle pedal), a throttleposition sensor for detecting the throttle valve opening degree, anexhaust gas sensor, a temperature sensor of cooling water for theengine, etc.

A switch sensor group 105 which inputs signals to the microprocessor 110through an interface circuit (not shown) contains various kinds ofsensors of ON/OFF operation for monitoring the operation condition ofthe engine such as a crank angle sensor of the engine, a pulse sensorfor measuring the speed of the vehicle, etc.

An electrical load group 106 which is supplied with power from themicroprocessor 110 through an interface circuit (not shown) and drivencontains an electromagnetic coil for driving a fuel injection valve, anignition coil of the engine (when the engine type is a gasoline engine),a motor for controlling the valve opening degree of the air intakethrottle, a motor for driving an exhaust circulating valve, anelectromagnetic clutch for an air conditioner, an alarm/display unit,etc.

An external tool 107 which is connected to the microprocessor 110through a serial interface circuit is connected to the electroniccontrol unit 100A through a detachable connector (not shown) whenshipping inspection of products and maintenance and check-out arecarried out.

As the internal construction of the electronic control unit 100A, themicroprocessor 110 is connected to a program memory (FMEM) 111A as anon-volatile flash memory, a RAM memory (RMEM) 112 for operationprocessing and a non-volatile data memory (DMEM) 113 as EEPROM memorythrough a bus so as to cooperate with each memory. In the program memory111A stored are not only an input/output control program as theelectronic control unit 100A, but also a periodically updating unit 304,band check units 311 and 313, a collinear approximate coefficientcalculating unit 312, a time overrun determining unit 315, an averagingunit 316, an abnormality informing unit 318, an interpolation correctingunit 422, a control program as an evacuation storing unit 427 andvarious kinds of control data as threshold values for determination.

A multi-channel AD converter (ADC) 114 is equipped with an AD conversionunit 114 a having a resolution of 10-bit precision, for example, and abuffer memory (BMEM) 114 b in which digital conversion values of 16channels are stored. When receiving an AD conversion instruction 115 afrom the microprocessor 110, the multi-channel AD converter 114generates an input switching signal 117 a described later, successivelyconverts analog input voltages Ai of 16 channels to digital conversionoutputs Di and stores the thus-obtained digital conversion outputs intoa buffer memory 114 b.

A reference voltage Vref is applied to the reference voltage terminal ofthe AD converter 114. The relationship of the analog input voltage Ai,the digital conversion output Di, the reference voltage Vref and theresolution n is represented by the following equation:Di=(2^(n)−1)×(Ai/Vref)   (1)In the case of the resolution of n=10, the constant K=(2^(n)−1)=1023.

In FIG. 2 showing the input/output characteristic of the AD converter114, the abscissa axis represents the analog input voltage ratioAi/Vref, the ordinate axis represents the digital conversion output Di,and an ideal characteristic line 200 shown by a solid line representsthe equation (1).

Returning to FIG. 1, the microprocessor 110 can indicate the address ofthe buffer memory 114 b on the basis of a data select instruction signal115 b, and transfer and write digital conversion data 115 c of an analoginput of a desired channel number into a RAM memory 112. A multiplexer(MPX) 116 has analog input terminals of 16 points of channel numbers CH0to CH15, generates an analog input signal 117 b selected in response tothe input switching instruction signal 117 a, and supplies the generatedanalog input signal 117 b into the AD converter 114. Voltage dividingresistors 118 a to 118 d are connected to one another in series, dividethe voltage of the reference voltage Vref to obtain a first calibrationvoltage A1 and a second calibration voltage A2, and supply the first andsecond calibration voltages A1 and A2 to the channels CH1 and CH0 of themultiplexer. An analog signal voltage obtained from the analog sensorgroup 104A is applied to the other channels CH2 to CH15 of themultiplexer 116.

In FIG. 2, a single approximate line 201 indicated by a broken line is aline passing through the coordinate point (A1/Vref, D1) of the firstcalibration voltage A1 and the first digital conversion value D1corresponding to this calibration voltage A1 and the coordinate point(A2/Vref, D2) of the second calibration voltage A2 and the seconddigital conversion value D2 corresponding to this calibration voltageA2, and it is calculated according to the following equation:(Di)=α×(Ai/Vref)+β  (2)Here,proportional efficiency α=Vref×(D2−D1)/(A2−A1)   (21)offset component β=(D1×A2−D2×A1)/(A2−A1)   (22)

Returning to FIG. 1, a control power supply unit (PSU) 120 is suppliedwith power from the output contact point 102 a of the power supply relay102, generates a control voltage Vcc=5V on the basis of the power supplyvoltage DC 10 to 16V of the power supply 101 and supplies a stabilizedvoltage to each of parts containing the microprocessor 110. The controlvoltage Vcc is directly used as the reference voltage Vref. The powercontrol circuit 121 energizes the power supply relay 102 just after thepower switch 103 closes the circuit. However, when the power supplyswitch 103 opens the circuit, the power supply relay 102 is deenergizedafter a predetermined delay time elapses. Accordingly, evacuationprocessing of the microprocessor 110 is executed during this delayshut-off period.

(2) Detailed Description of Action and Operation

When the power supply switch 103 closes the circuit in the firstembodiment constructed as shown in FIG. 1, the output contact point 102a of the power supply relay 102 closes the circuit, the control powersupply unit 120 is supplied with power from the power supply 101 togenerate a stabilized control power supply voltage Vcc, and themicroprocessor starts its operation. The microprocessor 110 controls theoperation of the electrical load group 106 in response to the voltagelevel of an analog signal obtained from the analog sensor group 104A,the operation state of an ON/OFF signal obtained from the switch sensorgroup 105 and an input/output control program stored in the programmemory 111A.

It will be described with reference to flowcharts of FIGS. 3 and 4 howthe microprocessor takes an analog signal voltage from the analog sensorgroup 104A with high precision. In the flowchart showing a first halfoperation of the microprocessor 110 in FIG. 3, in step 300, themicroprocessor 110 starts analog input processing, and in subsequentstep 301, it is determined on the basis of the operation state of a flag(not shown) whether the starting operation of the analog inputprocessing in step 300 is an initial starting operation just after thepower supply switch 103 closes the circuit. If the starting operation isdetermined as the initial starting operation (step 301; Yes), theprocessing goes to step 302 a. If the starting operation is notdetermined as the initial operation (step 301; No), the processing goesto step 304.

In step 302 a, an initial value of a parameter for executinginterpolation correction calculation in subsequent step 422 describedlater is read out from the program memory 111A and written into a firstarea of the RAM memory 112, and in subsequent step 303 a calculationcompletion flag of the parameter set in subsequent step 317 describedlater is reset. When the step 303 is executed, the processing shifts tostep 424 of FIG. 4 through a relay terminal A. If the power supplyswitch 103 does not open the circuit, the processing goes to step 425 togenerate an AD conversion instruction 115 a and then goes to anoperation finishing step 426. The microprocessor 110 is set to a standbystate in the operation finishing step 426, and it goes to step 300 tostart the analog input processing again when a predetermined timeelapses after the microprocessor 110 executes another control flow. Thetime required for the series of flows from the operation starting step300 to the operation finishing step 426 is equal to 100 μs or lessalthough it passes through any flow. However, the period at which theoperation starting step 300 is activated is equal to 10 ms, for example.Furthermore, when receiving the AD conversion instruction 115 a in step425, the AD converter 114 executes AD conversion processing of the 16channels and stores the digital conversion values into the buffer memory114 b. The time for which the AD converter 114 executes the ADconversion processing of the 16 channels is equal to 200 μs or less, andwhen the operation starting step 300 is activated again after theprocessing passes through the operation finishing step 426, the ADconversion which is instructed in step 425 has been completed.

A step 304 is a step of determining the calibration timing. This step304 serves as the following periodically updating unit. That is, adetermination of Yes is made when the initial determining operation(corresponding to the second operation as the control flow operation) isexecuted after the power supply switch 103 closes the circuit, and thenthe processing goes to step 305. At a normal time, determination of Nois made and then the processing goes to step 306. However, when theprocessing passes through the step 304 again after several minutes, thedetermination of Yes is made again. The calibration period is set to atime shorter than the thermal time constant of the AD converter 114. Instep 305, the parameter calculation completion flag set in step 317described later is reset and the processing goes to step 310 when thecalibrating operation is started. The bock of the series 320 from steps310 to 319 b serves as a practical parameter calculating unit, andplural calculation cycles are required until the initial value of theparameter applied in step 302 a is replaced by the practical parametercalculated in the step block 320 and updated and written into the firstarea of the RAM memory 112 in step 302 b. In step 306, it is determinedwhether the parameter calculation completion flag is set or not in step317 described later. If the calculation has not yet been completed, adetermination of No is made, and the processing goes to step 310. If thecalculation has been completed, a determination of Yes is made, and theprocessing goes to step 420 of FIG. 4 through the relay terminal B.

In step 310, the value of the first digital conversion value D1corresponding to the first calibration voltage A1 and the value of thesecond digital conversion value D2 corresponding to the secondcalibration voltage A2 out of the digital conversion values which havebeen subjected to AD conversion in step 425 described later are read outfrom the buffer memory 114 b, and stored into first and second addressesof the RAM memory 112. The subsequent step 311 is a determining stepserving as a band check unit. That is, in step 311, it is determinedwhether the first and second digital conversion values D1 and D2 readout in step 310 are not out of a permissible variation width band storedin the program memory 111A. If there is any abnormal data out of theband, a determination of Yes is made and the processing goes to step 319b. If these data are in the normal range, a determination of NO is madeand the processing goes to step 312. It is reasonable that thepermissible variation width is set to the value of about ±10 mV obtainedby providing a margin of the double of the variation width of ±5 mV inspecification which is contained in the AD converter and thehigh-precision voltage-dividing resistors 118 a to 118 d. The step 312serves as a collinear approximate coefficient calculation unit ofcalculating a proportional coefficient α and the value of an offsetcomponent β according to the equations (21) and (22) described above onthe basis of the first calibration voltage ratio A1/Vref=0.25 and thesecond calibration voltage ratio A2/Vref=0.75 stored in the programmemory 111A and the coordinate points (A1/Vref, D1) (A2/Vref, D2)determined on the basis of the first and second digital conversionvalues D1 and D2 read out in step 310.

The subsequent step 313 is the following determining step serving as aband check unit. That is, in step 313, it is determined whether thevalue of the parameter α as the proportional coefficient and the valueof the parameter β as the offset component are not out of thepermissible variation width stored in the program memory 111A in thecollinear approximate coefficient calculation in step 312, and if anyparameter is abnormal, a determination of YES is made and the processinggoes to step 319 b. If all the parameters are normal, a determination ofNO is made and the processing goes to step 314. The subsequent step 314is the following determining step. In step 314, it is determined whetherthe calculation of the parameter in step 312 is executed at a frequencyN=5 times, for example. If the execution frequency is low, adetermination of NO is made, and the processing goes to step 420 of FIG.4 through the relay terminal B. If the calculation of N=5 times iscompleted or if the time exceeds a predetermined limit time although theexecution frequency is low, the determination of YES is made and theprocessing goes to step 315. If the determination of the step S314 isNO, the processing returns from the relay terminal B through the steps420 to 426 of FIG. 4 to the step 300 of FIG. 3, and parameters α1 to α5and β1 to β5 of the calculations of 5 times are calculated while theprocessing circulates through the steps 301, 304, 306, 310, 311, 312,313 and 314. In the calculation of each parameter, the AD conversioninstruction 115 a caused by the step 425 occurs every calculation, andthe calibration data read out by the step 310 is updated.

When the step 311 or 313 makes an abnormality determination in theprocess of calculating the plural parameters α, β, the processingcirculates through the step 319 b, the relay terminal B, the steps 420to 426, the step 300, the step 301, the step 304, the step 306, the step310 and the steps 311 to 313. If normal data are obtained, theprocessing goes from the steps 311 to 313 to the step 314 to add thecalculation frequency. Accordingly, when the abnormality determinationin the step 311 or 313 is continued, a time-out determination is madeeven when the calculation frequency is low, and thus the processing goesto step 315.

The step 315 is a determining step serving as a time overrun determiningunit. That is, in the step 315, when the determination of the step 314is a time-out determination, a determination of YES is made and theprocessing goes to step 318. If it is determined in step 314 that thecalculations of N=5 times have been normally completed, a determinationof NO is made and the processing goes to step 316. The step 316 is astep serving as an averaging unit of averaging the temporarily storedparameters of the 5-time calculations by a statistical method such as aleast square method or the like to calculate and store practicalparameters α0, β0. A step 317 is a step of setting the calculationcompletion flag of the parameter and also resetting a counter (notshown) for counting the execution frequency of the step 312. Insubsequent step of the step 316, the band check of the practicalparameters such as the averaged proportional coefficient α0 calculatedin the step 316 and the averaged offset component β0 may be carried out.In this case, if the band has any abnormal value, the processing goes tostep 319 a, and if the band is normal, the processing goes to step 317.

The subsequent step 302 b to the step 317 is a step of writing thepractical parameters calculated in the step 316 into the first area ofthe RAM memory 112 in place of the initial value written in the step 302a, and the processing goes to step 420 of FIG. 4 through the relayterminal B subsequently to the step 302 b. The step 318 is a stepserving as an abnormality informing unit which generates an alarmdisplay instruction output which is executed when the determination ofthe step 315 is “time overruns”, and shifts the processing to step 319a. In the step 319 a, the counter (not shown) for counting the executionfrequency of the step 312 is reset, and calculation of the parameters ofa predetermined frequency and averaging calculation thereof are executedagain. A step 319 b which is executed when the determination of the step311 or 313 is YES or after the step 319 a is executed is a step ofsetting an abnormal flag for storing occurrence of abnormality, andsubsequently to the step 319 b, the processing goes to step 420 of FIG.4 through the relay terminal B.

In FIG. 4 showing the second half operation of the microprocessor shownin FIG. 1, the step 420 is a step of setting an analog input number. Inthe step 420, the address of the buffer memory 114 b is indicated by adata select instruction signal 115 b of FIG. 1, and the read-out of thedigital conversion value corresponding to the analog input signal inputto the input channel number CH2, for example, is indicated. Thesubsequent step 421 is a step of reading out the content (BFMn) of thebuffer memory 114 b of the address BFMn indicated in the step 420 to theaddress RAMn of the RAM memory 112. The subsequent step 422 is a stepserving as an interpolation correcting unit for calculating thecorrected digital conversion value (RAMn) from the value of the content(BFMn) of the buffer memory 114 b read out in the step 421 and updatingand storing the calculated value as the content of the address RAMn ofthe RAM memory 112.

When the digital conversion value (Di)=(BFMn) in the calculationequation (2), the analog input voltage ratio (Ai/Vref) is calculatedaccording to the following equation.(Ai/Vref)=[(BFMn)−β]/α  (3)As the parameters α, β are used the initial values read out in step 302a until the parameter calculation is completed, and also used theaverage values α0, β0 of (α1 to α5), (β1 to β5) calculated and stored instep 316. If the AD converter 114 has an ideal conversion characteristicindicated by an ideal characteristic line 200 of FIG. 2 with thethus-calculated analog input voltage ratio (Ai/Vref) as a reference, theobtained digital conversion value is calculated according to theequation (1), and this value corresponds to the corrected digitalconversion value (RAMn).(RAMn)=(2^(n)−)×(Ai/Vref)   (4)

In the subsequent step 423, it is determined whether the correction ofthe AD conversion associated with all the analog sensor group 104 iscompleted. If the correction has not yet been completed, the processingreturns to the step 420, and if the correction has been completed, adetermination of YES is made and the processing goes to step 424. If thedetermination of the step 423 is “NO” and the processing returns to thestep 420, the input number is successively updated to the channels CH3to CH15. In the step 424, it is determined whether the power supplyswitch 103 opens the circuit. If the power switch 103 does not open thecircuit, a determination of NO is made, and the processing goes to step425. If the power supply switch 103 opens the circuit, a determinationof YES is made, and the processing goes to step 427. In step 425, afterthe AD conversion instruction 115 a is generated, the processing goes tothe operation finishing step 426. The instruction flag (not shown) whichis set by the AD conversion instruction 115 a is reset by the conversioncompletion signal generated by the AD converter 114.

The step 427 is a step serving as an evacuating storing unit fortemporarily reading out abnormality record information stored in thenon-volatile data memory 113 and transferring and storing the additionresult of the abnormality record information and the abnormalityinformation stored in step 319 b into the data memory 113 again. In step319 b, the abnormality occurrence frequency is counted every abnormalitymode such as the abnormality of the read-out calibration based on thedetermination of the step 311, the abnormality of the parameter based onthe determination of the step 313, the time-out abnormality based on thedetermination of the step 315, etc., and the counted abnormalityoccurrence frequency is accumulatively added in step 427. Subsequentlyto the step 427, the microprocessor 110 stops the operation, and thepower supply relay 102 is deenergized by the power supply controlcircuit in connection with stop of a watch dog signal, for example.

(3) Summary and Feature of First Embodiment

The electronic control device 100A according to the first embodiment isdesigned as an electronic control device having an analog input signalin which one of analog signals of plural points obtained from the analogsensor group 104A is successively selected by the multiplexer 116 andapplied to the analog input terminal of the AD converter 114, and thedigital data digitally-converted by the AD converter 114 are input tothe microprocessor 110.

The calibrating voltage signals A1, A2 of plural points are input to themultiplexer 116, and the control program serving as the collinearapproximate coefficient calculating unit 312, the interpolationcorrecting calculation unit 422, the averaging unit 316 and the bandcheck units 311 and 313 is added to the program memory 111A cooperatingwith the microprocessor 110. The calibrating voltage signal correspondsto the voltage input signals A1 and A2 which are obtained by dividingthe reference voltage Vref applied to the reference voltage terminal ofthe AD converter 114 through the plural high-precision voltage-dividingresistors 118 a to 118 d.

The collinear approximation calculation unit 312 represents thecharacteristic of the digital conversion value to the overall band ofthe input signal voltage of the AD converter 114 by a single approximateline 201, calculates the proportional coefficient and the offsetcomponent of the approximate line calculation equation so that therelationship between the voltage and the digital conversion value of theplural calibrating voltage signals is contained in the approximate lineconcerned.

The interpolation correcting calculation unit 422 reads out the digitalconversion value to one input signal voltage of the analog input signal,calculates back the analog input voltage corresponding to the digitalconversion value from the approximate line, and sets a valueproportional to the back-calculation value as the corrected digitalconversion value.

The averaging unit 316 executes the approximation calculation at pluraltimes by the collinear approximation calculating unit 312, and therespective average values of the proportional coefficients and theoffset components are calculated and set as the practical parametersapplied in the interpolation correcting calculation unit 422.

The band check units 311 and 313 determine whether the digitalconversion value of the calibrating voltage signal is within the band ofthe upper and lower limit threshold values for calibration value storedin the program memory 111A or a parameter for collinear approximation,or whether the value of the practical parameter is within the band ofthe upper and lower limit threshold values of the parameter stored inthe program memory 111A. If the determination result is an abnormalvalue out of the band, the read-out of the digital conversion value ofthe calibrating voltage signal and the calculation of the parameter forthe collinear approximation and the averaging thereof are executedagain.

As the calibration voltage signals A1 and A2 used are the firstcalibration voltage A1 and the second calibration voltage A2 which areequal to about 25% and 75% of a predetermined reference voltage Vrefapplied to the reference voltage terminal of the AD converter,respectively. The first and second calibration voltages are set so as tosatisfy at least the relationship of 0<A1<A2<Vref. The collinearapproximate coefficient calculation unit 312 represents thecharacteristic of the digital conversion value to the whole band of theinput signal voltage of the AD converter 114 by the single approximateline 201. The single approximate line 201 is a characteristicapproximate line between the input voltage and the digital conversionoutput in which the first digital conversion value D1 corresponding tothe first calibration voltage A1 and the second digital conversion valueD2 corresponding to the second calibration voltage A2 are contained asthe coordinate points (A1/Vref, D1) and (A2/Vref, D2). Accordingly, thedigital conversion characteristic to the whole band of the input signalvoltage of the AD converter can be corrected by a relatively simplecalibrating unit which is not affected by the variation of the powersupply voltage.

The program memory 111A cooperating with the microprocessor 110 furthercontains a control program serving as the periodically updating unit304. The periodically updating unit 304 executes the collinearapproximate coefficient calculating unit 312, the averaging unit 316 andthe band check units 311 and 313 every predetermined period tosuccessively update the value of the averaged proportional coefficientα0 and the value of the averaged offset component β0 which are thepractical parameters. The predetermined period is shorter than the timecorresponding to the thermal time constant of the AD converter 114.Accordingly, the variation of the digital conversion characteristiccaused by the environmental temperature variation of the AD convertercan be corrected, and high-precision digital conversion data can beobtained.

The program memory 111A further contains a control program serving asthe time overrun determining unit 315. The time overrun determining unit315 calculates the averaged proportional coefficient α0 and the value β0of the averaged offset component in the averaging unit 316, anddetermines whether the time required to obtain the practical parameterexceeds a predetermined threshold time. When the time overrundetermining unit 315 makes a time overrun determination, an alarm isdisplayed by the abnormality informing unit 318. Accordingly, theabnormality informing unit 318 does not respond to sporadic abnormality,but informs abnormality in such a case that band check abnormalityoccurs duplicatively, thereby promoting maintenance and check.

In the band check units 311 and 313, the timing at which the voltagesignal for calibration is read out again after the abnormalitydetermination is made is executed in a subsequent calculation cyclewhich is different from the calculation cycle at which the abnormalitydetermination is made. Accordingly, calibrated data to which anabnormality determination is made is not re-used, but the collinearapproximate coefficient is efficiently calculated again.

The program memory 111A further contains a control program serving asthe evacuation storing unit 427. The evacuation storing unit 427 storesthe abnormality occurrence frequency at which the abnormalitydetermination is made by the band check units 311 and 313 and the timeoverrun determining unit 315, and transfers and stores it into thenon-volatile data memory 113. The transferred and stored abnormalityrecord information is read out and displayed by connecting the externaltool 107. Accordingly, the abnormality occurrence record information isread out, and the relationship of the calibration value, the variationpermissible range of the parameter and the time-out check time isanalyzed, whereby proper set values can be calculated.

Second Embodiment

(1) Detailed Description of Construction

FIG. 5 is a circuit block diagram showing a device according to a secondembodiment of the present invention, and the difference of FIG. 5 fromFIG. 1 will be mainly described. The same reference numerals in FIGS. 1and 5 represent the same or corresponding parts. In FIG. 5, anelectronic control device 100B supplied with power from the power supply101 through the power supply relay 102 has a microprocessor 110cooperating with a program memory 111B. In the program memory 111Bstored are not only the input/output program serving as the electroniccontrol device 100B, but also control programs serving as a periodicallyupdating unit 704 described later with reference to FIGS. 7 and 8, bandcheck units 711 and 713, a collinear approximate coefficient calculatingunit 712, a time overrun determining unit 715, an averaging unit 716, anabnormality informing unit 718, an interpolation correcting calculatingunit 822 and an evacuating storing means 827, and control data asdetermination threshold values.

The multichannel AD converter 114 has an AD conversion unit 114 havingresolution of 10-bit precision, and a buffer memory 114 b in whichdigital conversion values of 16 channels are stored as in the case ofFIG. 1. When receiving an AD conversion instruction 115 a from themicroprocessor 110, the multichannel AD converter 114 generates an inputswitching signal 117 a described later, successively converts an analoginput voltage Ai of each of 16 channels to a digital conversion outputDi and storing the digital conversion output Di into the buffer memory114 b. A reference voltage Vref is applied to the reference voltageterminal of the AD converter 114, and the relationship of the analoginput voltage Ai, the digital conversion output Di, the referencevoltage Vref and the resolution n is the same as shown in the equation(1).

As in the case of FIG. 1, the microprocessor 110 indicates the addressof the buffer memory 114 b on the basis of a data select instructionsignal 115 b, and can transfer and write digital conversion data 115 cof an analog input of a desired channel number into the RAM memory 112.The multiplexer 116 has analog input terminals of 16 points of channelnumbers CH0 to CH15, and it generates the analog input signal selectedin response to the input switching instruction signal 117 a and suppliesthe generated analog input signal to the AD converter 114.

Voltage-dividing resistors 119 a to 119 c are connected to one anotherin series to divide the voltage of the reference voltage Vref, therebyobtaining calibration voltages of four points, that is, a firstcalibration voltage A1 equal to about 25% of the reference voltage Vref,a second calibration voltage A2 equal to about 75% of the referencevoltage Vref, the minimum calibration voltage A0 for the input voltagein the neighborhood of 0V, and the maximum calibration voltage A3 in theneighborhood of the reference voltage Vref, and supplies these voltagesto the channels CH0 to CH3 of the multiplexer 116. In this embodiment,A0=0, A3=Vref. Analog signal voltages obtained from the analog sensorgroup 104B are applied to the other channels CH4 to CH15 of themultiplexer 116.

In FIG. 6 showing the input/output characteristic of the AD converter114, the abscissa axis represents the analog input voltage ratioAi/Vref, and the ordinate axis represents the digital conversion outputDi. An ideal characteristic line 600 represented by a solid line isshown in the equation (1). A first approximate line 601 indicated by athin broken line passes through the coordinate point (A0/Vref, D0) basedon the minimum calibration voltage A0=0 and the minimum digitalconversion value D0 corresponding to the minimum calibration voltage andthe coordinate point (A1/Vref, D1) based on the first calibrationvoltage A1 and the first digital conversion value D1 corresponding tothe calibration voltage, and the calculation equation is indicated bythe following equation:(Di)=A×(Ai/Vref)+B   (5)Proportional coefficient A=Vref×(D1−D0)/A1   (51)Offset Component B=D0   (52)

A second approximate line indicated by a chain line passes through thecoordinate point (A1/Vref, D1) based on the first calibration voltage A1and the first digital conversion value D1 corresponding to thecalibration voltage and the coordinate point (A2/Vref, D2) based on thesecond calibration voltage A2 and the second digital conversion value D2corresponding to the second calibration voltage A2, and the calculationequation thereof is indicated by the following equation:(Di)=C×(Ai/Vref)+D   (6)Proportional coefficient C=Vref×(D2−D1)/(A2−A1)   (61)Offset Component D=(D1×A2−D2×A1)/(A2−A1)   (62)

A third approximate line indicated by a heavy broken line passes throughthe coordinate point (A2/Vref, D2) based on the second calibrationvoltage A2 and the second digital conversion value D2 corresponding tothe second calibration voltage A2 and the coordinate point (A3/Vref, D3)based on the maximum calibration voltage A3=Vref and the maximum digitalconversion value D3 corresponding to the maximum calibration voltageA3=Vref, and the calculation equation thereof is indicated by thefollowing equation:(Di)=E×(Ai/Vref)+F   (7)Proportional coefficient E=Vref×(D3−D2)/(Vref−A2)   (71)Offset Component F=(D2×Vref−D3×A2)/(Vref−A2)   (72)(2) Detailed Description of Action and Operation

Next, in the device of the second embodiment according to the presentinvention constructed as shown in FIG. 5, when the power supply switch103 closes the circuit, the output contact of the power supply relay 102closes the circuit, so that the control power supply unit 120 issupplied with power from the power supply 101 to generate a stabilizedcontrol power supply voltage Vcc and the microprocessor 110 starts itsoperation. The microprocessor 110 controls the driving of the electricalload group 106 in response to the voltage level of the analog signalobtained from the analog sensor group 104B, the operation state of theON/OFF signal obtained from the switch sensor group 105 and theinput/output control program stored in the program memory 111B. It willbe described with reference to the flowcharts of FIGS. 7 and 8 how themicroprocessor 110 takes in the analog signal voltage from the analogsensor group 104B with high precision. The flowcharts of FIGS. 7 and 8have the same construction as the flowcharts of FIGS. 3 and 4, and aredifferent from FIGS. 3 and 4 only in that the 300s' and 400s' stepnumbers are changed to 700s' and 800s' step numbers.

In FIG. 7, a step 710 is a step of reading the value of the minimumdigital conversion value D0 corresponding to the minimum calibrationvoltage A0=0, the value of the first digital conversion value D1corresponding to the first calibration voltage A1, the value of thesecond digital conversion value D2 corresponding to the secondcalibration voltage A2 and the value of the maximum digital conversionvalue D3 corresponding to the maximum calibration voltage A3 out of thedigital conversion values AD-converted in step 825 of FIG. 8 from thebuffer memory 114 b, and stores these values into a predetermined areaof the RAM memory 112. A step 712 is a step serving as a collinearapproximate coefficient calculating unit for calculating the values ofthe proportional coefficients A, C and E and the offset components B, D,F according to the equations (51), (52), (61), (62), (71) and (72)described above on the basis of the values of the respective calibrationvoltage ratios A0/Vref=0, A1/Vref=0.25, A2/Vref=0.75 and A3/Vref=1.0stored in the program memory 111B, and the coordinate points (A−/Vref,D0), (A1/Vref, D1), (A2/Vref, D2) and (A3/Vref, D3) determined on thebasis of the respective digital conversion values D0 to D3 read out instep 710. Furthermore, a step 716 is a step serving as an averaging unitfor averaging parameters obtained through five calculating operationsand stored temporarily in step 712 by a statistical method such as theleast square method or the like and calculating and storing practicalparameters associated with the first, second and third approximate lines601, 602 and 603.

Furthermore, in FIG. 8, a step 822 is a step serving as an interpolationcorrecting calculation unit for calculating a corrected digitalconversion value (RAMn) from the value of the content (BFMn) of thebuffer memory 114 b which is read out in step 821, and updating andrewriting the digital conversion value as the content of the addressRAMn of the RAM memory 112. When the digital conversion value(Di)=(BFMn) in the calculation equations (1), (6) and (7), the analoginput voltage ratio (Ai/Vref) thereof is calculated according to thefollowing equations.(Ai/Vref)=[(BFMn)−B]/A   (81)(Ai/Vref)=[(BFMn)−D]/C   (82)(Ai/Vref)=[(BFMn)−F]/E   (83)As the parameters A to F used are initial values read out in step 702 auntil the calculation of the parameters is completed, and an averagevalue calculated and stored in step 716 after the calculation iscompleted. However, it is varies in accordance with the value of (BFMn)which one of the calculation equations (81), (82) and (83) is applied.If the value of (BFMn) is not more than D1, the equation (81) isapplied, if the value of (BFMn) is between D1 and D2, the equation (82)is applied, and if the value of (BFMn) is not less than D2, the equation(83) is applied. Even when the thus-calculated analog input voltageratio (Ai/Vref) is set as a reference, the obtained digital conversionvalue is calculated according to the equation (1) if the AD converter114 has an ideal conversion characteristic indicated by the idealcharacteristic line 600 of FIG. 6, and this calculated digitalconversion value corresponds to the corrected digital conversion value(RAMn).(RAMn)=(2^(n)−1)×(Ai/Vref)   (9)

As is apparent from the foregoing description, the AD converteraccording to the present invention obtains the digital conversion valuecorresponding to the ratio between the input signal voltage Ai of the ADconverter and the reference voltage Vref applied to the referencevoltage terminal of the AD converter, and the control power supplyvoltage Vcc (for example DC5V) corresponding to the output voltage ofthe control power supply unit 120 is used as the reference voltage Vref.Accordingly, even when the control power supply voltage Vcc varies, theinput voltage ratio based on the voltage-dividing resistors does notvary. However, a detection error occurs in an application requiring theabsolute value of the analog input voltage. As a countermeasure, atemperature sensor is provided in the neighborhood of the control powersupply unit 120, and the environmental temperature based on thetemperature sensor is stored into the RAM memory through the ADconverter 114 and the microprocessor 110. In addition, thecharacteristic between the output voltage and the environmentaltemperature of the control power supply unit 120 is written into theprogram memory 111B in advance by a data table or an approximateexpression. Therefore, idealistically, the output voltage of the controlpower supply unit 120 is estimated from the environmental temperatureunder the operation state, and the digital conversion value obtained inaccordance with the voltage variation rate from the targeted controlpower supply voltage Vcc=5V is corrected.

(3) Summary and Feature of Second Embodiment

The electronic control device 100B according to the second embodiment ofthe present invention is designed as an electronic control device havingan analog input signal so that one of analog input signals of pluralpoints obtained from the analog sensor group 104B is successivelyselected by the multiplexer 116 and applied to the analog input terminalof the AD converter 114, and the digital data digitally converted by theAD converter 114 are input to the microprocessor 110.

The calibration voltage signals A0, A1, A2, A3 of plural points areinput to the multiplexer 116, and the control programs serving as thecollinear approximate coefficient calculating unit 712, theinterpolation correcting calculation unit 822, the averaging unit 716and the band check units 711 and 713 are added to the program memory111B cooperating with the microprocessor 110.

The calibration voltage signal corresponds to the voltage input signalsA0, A1, A2, A3 obtained by dividing the reference voltage Vref appliedto the reference voltage terminal of the AD converter 114 through theplural high-precision voltage-diving resistors 119 a to 119 d.

The collinear approximate coefficient calculating unit 712 representsthe characteristic of the digital conversion value to the whole band ofthe input signal voltage of the AD converter 114 by plural approximatelines 601, 602, 603, and calculates the proportional coefficient of theapproximate line calculation equation and the offset component so thatthe relationship between the voltage and the digital conversion value inthe plural calibration voltage signals is contained in the approximateline concerned, and sets them as the parameters for the collinearapproximation.

The interpolation correcting calculation unit 822 reads out the digitalconversion value to one input signal voltage of the analog input signal,calculates back the analog input voltage corresponding to the digitalconversion value concerned from the approximate line, and sets the valueproportional to the calculated-back calculation value as the correcteddigital conversion value.

The averaging unit 716 executes the calculation of the approximationcalculation equation of the collinear approximate coefficientcalculating unit 712 at plural times, calculates the respective averagevalues of the thus-obtained proportional coefficient and offsetcomponent and sets the obtained values as the practical parameters to beapplied in the interpolation correcting calculation unit 822.

The band check units 711 and 713 determine whether the digitalconversion value of the calibration voltage signal is within the rangeof the upper and lower limit threshold values for calibration valuesstored in the program memory 111B or is the parameter for the collinearapproximation or whether the value of the practical parameter is withinthe range of the upper and lower limit threshold values of theparameters stored in the program memory 111B. If the determinationresult is an abnormal value out of the range, the band check units 711and 713 execute the read-out of the digital conversion value of thecalibration voltage signal and the calculation and averaging of theparameter for collinear approximation.

As the calibration voltage signals A0 to A3 used are four calibrationvoltages of a first calibration voltage A1 and a second calibrationvoltage A2 which are in the neighborhood of 25% and 75% of apredetermined reference voltage Vref applied to the reference voltageterminal of the AD converter 114, the minimum calibration voltage A0 foran input voltage in the neighborhood of 0V and the maximum calibrationvoltage A3 in the neighborhood of the reference voltage Vref. Thesecalibration voltage signals A0 to A3 are set so as to satisfy at leastthe relationship of 0≦A0<A1<A2<A3≦Vref. The collinear approximatecoefficient calculating unit 712 represents the characteristic of thedigital conversion value to the whole band of the input signal voltageof the AD converter 114 by a polygonal line based on the first, secondand third approximate lines 601, 602 and 603.

The first approximate line 601 is a characteristic approximate linerepresenting the relationship between the input voltage ratio and thedigital conversion output on which the minimum digital conversion valueD0 corresponding to the minimum calibration voltage A0 and the firstdigital conversion value D1 corresponding to the first calibrationvoltage A1 are contained as the coordinate point (A0/Vref, D0) and(A1/Vref, D1).

The second approximate line 602 is a characteristic approximate linerepresenting the relationship between the input voltage ratio and thedigital conversion output on which the first digital conversion value D1corresponding to the first calibration voltage A1 and the second digitalconversion value D2 corresponding to the second calibration voltage A2are contained as the coordinate points (A1/Vref, D1) and (A2/Vref, D2).

The third approximate line 603 is a characteristic approximate linerepresenting the relationship between the input voltage ratio and thedigital conversion output on which the second digital conversion valueD2 corresponding to the second calibration voltage A2 and the maximumdigital conversion value D3 corresponding to the maximum calibrationvoltage A3 are contained as the coordinate points (A2/Vref, D2) and(A3/Vref, D3).

Accordingly, the correction of the digital conversion characteristic tothe whole band of the input signal voltage of the AD converter can beperformed with high precision. Furthermore, the number of thehigh-precision voltage-dividing resistors to obtain the calibrationvoltage signal is not increased, and thus the electronic control devicecan be constructed at low price.

The program memory 111B cooperating with the microprocessor 110 furthercontains a control program serving as a periodically updating unit 704.The periodically updating unit 704 executes the collinear approximatecoefficient calculating unit 712, the averaging unit 716 and the bandcheck units 711 and 713 every predetermined period, and successivelyupdates the values of the averaged proportional coefficients A, C and Eand the values of the averaged offset component which are the practicalparameters. The period is set to be shorter than the time correspondingto the thermal time constant of the AD converter 114. Accordingly, thevariation of the digital conversion characteristic which is caused bythe environmental temperature variation of the AD converter can becorrected and the high-precision digital conversion data can beobtained.

The program memory 111B further contains a control program serving as atime overrun determining unit 715. The time overrun determining unit 715calculates the averaged proportional coefficients A, C and E and thevalues B, D and F of the averaged offset components in the averagingunit 716, and determines whether the time required to obtain thepractical parameters exceeds a predetermined threshold time. When thetime overrun determining unit 715 makes a time overrun determination, analarm is displayed by the abnormality informing unit 718. Accordingly,the time overrun determining unit 715 does not respond to sporadicabnormality, and informs abnormality in such a case that band checkabnormality occurs duplicatively, thereby promoting maintenance andcheck.

In the band check units 711 and 713, the timing at which the calibrationvoltage signal is read out again after the abnormality determination ismade is executed in a subsequent operation cycle which is different froman operation cycle in which the abnormality determination is made.Accordingly, calibration data to which the abnormality determination ismade is not re-used, and the collinear approximate coefficient can beefficiently calculated again.

The program memory 111B further contains a control program serving as anevacuation storing unit 827. The evacuation storing unit 827 stores anabnormality occurrence frequency at which the abnormality determinationis executed by the band check units 711 and 713 and the time overrundetermining unit 715, and transfers and stores it into the non-volatiledata memory 113. The transferred and stored abnormality recordinformation is read out and displayed by connecting the external tool107. Accordingly, the proper set value can be calculated by reading outthe abnormality occurrence record information and analyzing therelationship of the variation permissible range of the calibrationvalues and the parameters and the time-out check time.

Various modifications and alterations of this invention will be apparentto those skilled in the art without departing from the scope and spiritof this invention, and it should be understood that this is not limitedto the illustrative embodiments set forth herein.

1. An electronic control device having an analog input signal in whichone of analog input signals of plural points obtained from an analogsensor group is successively selected by a multiplexer and applied to ananalog input terminal of an AD converter, and digital datadigitally-converted by the AD converter are input to a microprocessor,wherein calibration voltage signals of plural points are input to themultiplexer; control programs serving as a collinear approximatecoefficient calculating unit, an interpolation correcting calculationunit, an averaging unit and a band check unit are added to a programmemory cooperating with the microprocessor; the calibration voltagesignals are voltage input signals obtained by dividing a referencevoltage Vref applied to a reference voltage terminal of the AD converterwith plural high-precision voltage-dividing resistors; the collinearapproximate coefficient calculating unit represents a characteristic ofa digital conversion value to the whole band of the input signal voltageof the AD converter by a single or plural approximate lines, calculatesa proportional coefficient and an offset component of an approximateline calculation equation so that the relationship between the voltageand the digital conversion value of the plural calibration voltagesignals is contained on the approximate line, and sets the calculatedproportional coefficient and offset component as parameters forcollinear approximation; the interpolation correcting calculation unitreads out a digital conversion value to one input signal voltage of theanalog input signals, calculates back the analog input voltagecorresponding to the digital conversion value from the approximate line,and sets the value proportional to the calculated-back calculation valueas a corrected digital conversion value; the averaging unit executescalculation of an approximate calculation equation by the collinearapproximate coefficient calculating unit at plural times, calculatingeach average value of the obtained proportional coefficient and offsetcomponent and sets the average value as a practical parameter to beapplied in the interpolation correcting calculating unit; and the bandcheck unit determines whether the digital conversion value of thecalibration voltage signal is within a range of upper and lower limitthreshold values for calibration values stored in the program memory oris a parameter for collinear approximation, or whether the value of thepractical parameter is within a range of upper and lower limit thresholdvalues of parameters stored in the program memory, and executes read-outof the digital conversion value of the calibration voltage signal andcalculation and averaging of the parameter for the collinearapproximation when the determination result is an abnormal value out ofthe range.
 2. The electronic control device having the analog inputsignal according to claim 1, wherein a first calibration voltage A1 inthe neighborhood of 25% of a predetermined reference voltage Vrefapplied to the reference voltage terminal of the AD converter and asecond calibration voltage A2 in the neighborhood of 75% of thepredetermined reference voltage Vref are used as the calibration voltagesignal, the first and second calibration voltages are set so as tosatisfy at least the relationship of 0<A1<A2<Vref, the collinearapproximate coefficient calculating unit represents the characteristicof the digital conversion value to the whole band of the input signalvoltage of the AD converter by the single approximate line, and thesingle approximate line is a characteristic approximate linerepresenting the relationship between an input voltage ratio and adigital conversion output in which the first digital conversion value D1corresponding the first calibration voltage A1 and the second digitalconversion value D2 corresponding to the second calibration voltage A2are contained as coordinate points (A1/Vref, D1) and (A2/Vref, D2). 3.The electronic control device having the analog input signal accordingto claim 1, wherein as the calibration voltage signal used are fourcalibration voltages of a first calibration voltage A1 and a secondcalibration voltage A2 which are in the neighborhood of 25% and 75% of apredetermined reference voltage Vref applied to the reference voltageterminal of the AD converter, the minimum calibration voltage A0 for aninput voltage in the neighborhood of 0V and the maximum calibrationvoltage A3 in the neighborhood of the reference voltage Vref, thecalibration voltage signals A0 to A3 are set so as to satisfy at leastthe relationship of 0≦A0<A1<A2<A3≦Vref, the collinear approximatecoefficient calculating unit represents the characteristic of thedigital conversion value to the whole band of the input signal voltageof the AD converter by a polygonal line based on first, second and thirdapproximate lines, the first approximate line is a characteristicapproximate line representing the relationship between the input voltageratio and the digital conversion output on which the minimum digitalconversion value D0 corresponding to the minimum calibration voltage A0and the first digital conversion value D1 corresponding to the firstcalibration voltage A1 are contained as the coordinate points (A0/Vref,D0) and (A1/Vref, D1), the second approximate line is a characteristicapproximate line representing the relationship between the input voltageratio and the digital conversion output on which the first digitalconversion value D1 corresponding to the first calibration voltage A1and the second digital conversion value D2 corresponding to the secondcalibration voltage A2 are contained as the coordinate points (A1/Vref,D1) and (A2/Vref, D2), and the third approximate line is acharacteristic approximate line representing the relationship betweenthe input voltage ratio and the digital conversion output on which thesecond digital conversion value D2 corresponding to the secondcalibration voltage A2 and the maximum digital conversion value D3corresponding to the maximum calibration voltage A3 are contained as thecoordinate points (A2/Vref, D2) and (A3/Vref, D3).
 4. The electroniccontrol device having the analog input signal according to claim 1,wherein the program memory cooperating with the microprocessor furthercontains a control program serving as a periodically updating unit, theperiodically updating unit executes the collinear approximatecoefficient calculating unit, the averaging unit and the band check unitevery predetermined period to successively update the value of anaveraged proportional coefficient and the value of an averaged offsetcomponent which are the practical parameters, and the predeterminedperiod is a period shorter than the time corresponding to the thermaltime constant of the AD converter.
 5. The electronic control devicehaving the analog input signal according to claim 1, wherein the programmemory further contains a control program serving as a time overrundetermining unit, the time overrun determining unit calculates thevalues of the averaged proportional coefficient and the averaged offsetcomponent in the averaging unit, and determines whether the timerequired to obtain the practical parameters exceed a predeterminedthreshold time, and an alarm is displayed by an abnormality informingunit when the time overrun determining means determines time overrun. 6.The electronic control device having the analog input signal accordingto claim 1, wherein a timing at which the calibration voltage signal isread out again after the abnormality determination is made in the bandcheck unit is executed in a subsequent operation cycle which isdifferent from an operation cycle in which the abnormality determinationis executed.
 7. The electronic control device having the analog inputsignal according to claim 5, wherein the program memory further containsa control program serving as an evacuation storing unit, the evacuationstoring unit stores an abnormality occurrence frequency at which theabnormality determination is executed by the time overrun determiningunit, and transfers and stores the abnormality occurrence frequency intothe non-volatile data memory 113, and the transferred and storedabnormality record information is read out and displayed by connectingan external tool.
 8. The electronic control device having the analoginput signal according to claim 6, wherein the program memory furthercontains a control program serving as an evacuation storing unit, theevacuation storing unit stores an abnormality occurrence frequency atwhich the abnormality determination is executed by the band check unit,and transfers and stores the abnormality occurrence frequency into thenon-volatile data memory, and the transferred and stored abnormalityrecord information is read out and displayed by connecting an externaltool.